(function(){
	
	Ext.define('AppView.sys.organization.OrganizationForm',{
		extend:'AppView.base.BaseForm',
		alias:'widget.organizationform',
		defaults:{xtype:'textfield',labelWidth:60,anchor:'100%'},
		requires:['AppView.public.comboBox.OrganizationTreePicker'],
		url:'/sys/organization/save.do',
		items:[
			{
				hidden:true,
				name:'id'
			},
			{
				fieldLabel:'名称',
				allowBlank:false,
				name:'orgName'
			},
			{
				fieldLabel:'编码',
				name:'orgCode'
			},
			{
				xtype:'numberfield',
				minValue:1,
				maxValue:10,
				value:1,
				fieldLabel:'层级',
				name:'orgLevel'
			},
			{
				xtype:'organizationtreepicker',
				fieldLabel : '所属组织',
				value:'',
				name : 'parentId'
			}
		],
		handleLoadSuccess:function(data){
		},
		initComponent:function(){
	    	this.callParent(arguments);
	    }
	})
	
	Ext.define('AppView.sys.organization.OrganizationWin',{
		extend:'AppView.base.FormWin',
		viewUrl:'/sys/organization/view.do',
		height:200,
		title:'组织',
		items:[
			{
				xtype:'organizationform'
			}
		]
	})
})()